﻿using DZParallelLib.Utility;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;

namespace DZParallelLib.Test.Utility
{
    [TestClass]
    public class DZImageIOTest
    {
        [TestMethod]
        [ExpectedException(typeof(FileNotFoundException))]
        public void TestLoadBadImageFile()
        {
            DZImageIO.LoadImageDZFile(new FileInfo("bogus.xml"));
        }

        [TestMethod]
        [DeploymentItem("DZImage1", "DZImage1")]
        public void TestLoadSingleImage()
        {
            var r = DZImageIO.LoadImageDZFile(new FileInfo(@"DZImage1\sc\vnpzyair.xml"));
            Assert.IsNotNull(r);
            Assert.AreEqual((uint)472, r.Size.Height, "image height");
        }
    }
}
